# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-http-parser
_pkgname=http-parser
pkgver=0.9.0
pkgrel=2
pkgdesc='HTTP request/response parser.'
url='https://pypi.org/project/http-parser/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools' 'cython2')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('b7c18c174c83ce36a45422be1ad277c8420787d553fb63eacfdd35f0e5fa27206686ce46e1c8857d4972c9a95b334323716a77ca0e7ab1210d3fd8c475c0d24c')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

